namespace Xmef.Engine
{
    using System;
    using Xmef.Interfaces;

    [Serializable]
    public class PropertyConverter<T> : PropertyConverter, IPropertyConverter<T>, IPluginIdentity
    {
        public static IPropertyConverter<T> Default;

        static PropertyConverter()
        {
            PropertyConverter<T>.Default = new PropertyConverter<T>();
        }

        public virtual T ConvertFromString(string s)
        {
            return PropertyConverter.ConvertFromString<T>(s);
        }

        public virtual string ConvertToString(T value)
        {
            return PropertyConverter.ConvertToString<T>(value);
        }
    }
}

